#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, Niklas Hauser
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# -----------------------------------------------------------------------------


def init(module):
    module.name = ":driver:i2c.eeprom"
    module.description = """\
# I2C Eeprom

Compatible with the 24C256 (ST) and 24FC1025 (Microchip) family and other
I2C eeprom with an 16-bit address pointer as well as devices with an 8-bit
address pointer.
Base address for most 24xxyyyy eeproms is 0x50.
"""

def prepare(module, options):
    module.depends(":architecture:i2c.device")
    return True

def build(env):
    env.outbasepath = "modm/src/modm/driver/storage"
    env.copy("i2c_eeprom.hpp")
    env.copy("i2c_eeprom_impl.hpp")
